package com.example.mybatisdemo.mapper;

import com.example.mybatisdemo.model.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;


/**
 * @author Asurf
 */
@Mapper
@Component
public interface UserMapper {
    /**
     * insert user
     * @param user
     * @return
     */
    public int insertUser(User user);

    /**
     * query user by id
     * @param id
     * @return
     */
    public User queryUser(int id);

    /**
     * delete user by id
     * @param id
     * @return
     */
    public int deleteUser(int id);

    /**
     * updateUser by id
     * @param user
     * @return
     */
    public int updateUser(User user);
}
